home *** CD-ROM | disk | FTP | other *** search
/ MacFormat 1995 January / macformat-020.iso / Shareware City / Developers / apps.to.go / DTS.Lib / DTS.Lib.headers / CIconControl.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-06-06  |  3.4 KB  |  86 lines  |  [TEXT/MPS ]

  1. #ifndef __CICONCONTROL__
  2. #define __CICONCONTROL__
  3.  
  4. #ifndef __TYPES__
  5. #include <Types.h>
  6. #endif
  7.  
  8. #ifndef __CONTROLS__
  9. #include <Controls.h>
  10. #endif
  11.  
  12. #ifndef __WINDOWS__
  13. #include <Windows.h>
  14. #endif
  15.  
  16. ControlHandle    CCIconNew(WindowPtr window, Rect *r, StringPtr title, Boolean vis, short val,
  17.                           short min, short max, short viewID, short refcon);
  18.     /*
  19.     **    ¶ Create a new 'cicn' control.
  20.     **
  21.     **    INPUT:    window            The window to add the control to
  22.     **            r                The bounding rect of the control being added
  23.     **            title            The title of the control being added (don't pass in nil here)
  24.     **            vis                True if control should be created initially visible
  25.     **            val                Initial value for the contrlValue field of the control
  26.     **            val                Initial value for the contrlMin field of the control
  27.     **            val                Initial value for the contrlMax field of the control
  28.     **            viewID            Normally rCIconCtl, as that is the standard AppsToGo
  29.     **                            resource ID for this control, but you may wish to have
  30.     **                            the CDEF have a different resource id #.
  31.     **            refcon            Initial value for the contrlRfCon field of the control
  32.     **    RESULT:    ControlHandle    The control handle of the created control, or nil if
  33.     **                            the control could not be created.
  34.     **
  35.     **    Create a new CIcon control.  All the parameters are what you would expect for creating
  36.     **    a new control.
  37.     **            Variants:
  38.     **                +1:    Sticky buttons.  (Can't be tracked off of once clicked on.)
  39.     **                +2:    Draw offscreen.  This is important if the control has a title and
  40.     **                    you don't want flashing. */
  41.  
  42.  
  43.  
  44. ControlHandle    CCIconNext(WindowPtr window, ControlHandle ctl, short dir, Boolean justActive);
  45.     /*
  46.     **    ¶ Iterate to the 'next' cicn control.
  47.     **
  48.     **    INPUT:    window            The window who's control list is to be searched
  49.     **            ctl                The control at which to start the search
  50.     **                            (Pass in nil to start at the beginning of the control list.)
  51.     **            dir                The direction of the search (1 or -1).  Note that the meaning
  52.     **                            of the beginning of the control list changes if -1 is passed in.
  53.     **                            The beginning of the control list to search is actually the
  54.     **                            last control in the window's control list if -1 is used.
  55.     **            justActive        If true, only find CCicon controls that are active.
  56.     **                            (Active is defined as contrlHilite != 255).
  57.     **    OUTPUT:    ControlHandle    Handle of CIcon found.  If nil is returned, no more to
  58.     **                            be found meeting criteria.
  59.     **
  60.     **    Return the next CIcon control from a window's control list. 
  61.     **
  62.     **    To get the first control in the window's control list, pass in a nil for ctl.
  63.     **    Pass in either 1 or -1 for the direction of the search.  Passing in a 1 means to
  64.     **    return the control just after the one passed in (or the first one if nil is passed in).
  65.     **    Passing in a -1 means to return the control just prior to the one passed in (or the
  66.     **    last control if nil is passed in).  If there are no more controls, then nil is returned.
  67.     **    The justActive field indicates if you want to return only visible, active controls.
  68.     **    If false is passed in, then the next control is returned, independent of state.
  69.     **    If true is passed in, then the next visible, active control is returned. */
  70.  
  71.  
  72.  
  73. Boolean            IsCIconCtl(ControlHandle ctl);
  74.     /*
  75.     **    ¶ Check if the control is a 'cicn' control.
  76.     **
  77.     **    INPUT:    ctl            Handle of control to test to see if it is a CIcon control.
  78.     **    RESULT:    Boolean        True if control is a CIcon control.
  79.     **
  80.     **    Check to see if the control is a CIcon control. */
  81.  
  82.  
  83.  
  84. #endif
  85.  
  86.